using System;
using Microsoft.SPOT;
using System.Collections;

namespace MLRobotic.IA.Goals
{
    public class GoalQueue
    {
        private ArrayList _goals = new ArrayList();

        public void Enqueue(Goal goal)
        {
            _goals.Add(goal);
        }

        public Goal Dequeue()
        {
            var g = _goals[0];
            _goals.RemoveAt(0);
            return (Goal)g;
        }

        public void Push(Goal goal)
        {
            _goals.Insert(0, goal);
        }

        public Goal Peek()
        {
            return (Goal)_goals[0];
        }

        public bool IsEmpty { get { return _goals.Count == 0; } }
    }
}
